From: Andrew Cooper Date: Mon, 5 Sep 2011 14:02:11 +0000 (+0100) Subject: IRQ: Remove bit-rotten code X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~9922 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=0ba296917d257c87dbfb71a77cf20768c7e084ce;p=xen.git IRQ: Remove bit-rotten code irq_desc.depth is a write only variable. LEGACY_IRQ_FROM_VECTOR(vec) is never referenced. Signed-off-by: Andrew Cooper Acked-by: George Dunlap --- diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index b333626791..0fdcc7d694 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -1967,7 +1967,6 @@ static void __init check_timer(void) if ((ret = bind_irq_vector(0, vector, mask_all))) printk(KERN_ERR"..IRQ0 is not set correctly with ioapic!!!, err:%d\n", ret); - irq_desc[0].depth = 0; irq_desc[0].status &= ~IRQ_DISABLED; /* diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index f4893d8d67..24bd74b551 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -202,7 +202,6 @@ static void dynamic_irq_cleanup(unsigned int irq) desc->handler->shutdown(irq); action = desc->action; desc->action = NULL; - desc->depth = 1; desc->msi_desc = NULL; desc->handler = &no_irq_type; desc->chip_data->used_vectors=NULL; @@ -302,7 +301,6 @@ static void __init init_one_irq_desc(struct irq_desc *desc) desc->status = IRQ_DISABLED; desc->handler = &no_irq_type; desc->action = NULL; - desc->depth = 1; desc->msi_desc = NULL; spin_lock_init(&desc->lock); cpus_setall(desc->affinity); @@ -817,7 +815,6 @@ void __init release_irq(unsigned int irq) spin_lock_irqsave(&desc->lock,flags); action = desc->action; desc->action = NULL; - desc->depth = 1; desc->status |= IRQ_DISABLED; desc->handler->shutdown(irq); spin_unlock_irqrestore(&desc->lock,flags); @@ -845,7 +842,6 @@ int __init setup_irq(unsigned int irq, struct irqaction *new) } desc->action = new; - desc->depth = 0; desc->status &= ~IRQ_DISABLED; desc->handler->startup(irq); @@ -1424,7 +1420,6 @@ int pirq_guest_bind(struct vcpu *v, struct pirq *pirq, int will_share) cpus_clear(action->cpu_eoi_map); init_timer(&action->eoi_timer, irq_guest_eoi_timer_fn, desc, 0); - desc->depth = 0; desc->status |= IRQ_GUEST; desc->status &= ~IRQ_DISABLED; desc->handler->startup(irq); @@ -1540,7 +1535,6 @@ static irq_guest_action_t *__pirq_guest_unbind( BUG_ON(action->in_flight != 0); /* Disabling IRQ before releasing the desc_lock avoids an IRQ storm. */ - desc->depth = 1; desc->status |= IRQ_DISABLED; desc->handler->disable(irq); diff --git a/xen/include/asm-x86/irq.h b/xen/include/asm-x86/irq.h index 1a37c4d4c2..448d96a6f8 100644 --- a/xen/include/asm-x86/irq.h +++ b/xen/include/asm-x86/irq.h @@ -19,7 +19,6 @@ #define MSI_IRQ(irq) ((irq) >= nr_irqs_gsi && (irq) < nr_irqs) #define LEGACY_VECTOR(irq) ((irq) + FIRST_LEGACY_VECTOR) -#define LEGACY_IRQ_FROM_VECTOR(vec) ((vec) - FIRST_LEGACY_VECTOR) #define irq_to_desc(irq) (&irq_desc[irq]) #define irq_cfg(irq) (&irq_cfg[irq]) diff --git a/xen/include/xen/irq.h b/xen/include/xen/irq.h index 647e2366b5..26cec64132 100644 --- a/xen/include/xen/irq.h +++ b/xen/include/xen/irq.h @@ -72,7 +72,6 @@ typedef struct irq_desc { hw_irq_controller *handler; struct msi_desc *msi_desc; struct irqaction *action; /* IRQ action list */ - unsigned int depth; /* nested irq disables */ struct irq_cfg *chip_data; int irq; spinlock_t lock;